<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>
         
         let fun = {
            name: '蔡徐坤',
            age: 23,
            height: 178,
            wight: 65,

            sing: function() {
                console.log("姬霓太美");
            },

            jump: function() {
                console.log("铁山靠");
            }
         }

         console.log(fun.name);
         console.log(fun.age);
         fun.sing();
         fun.jump();

         fun.id = 100;
         fun.sleep = function() {
            console.log(this.name + "打篮球");
         }

         fun.index = function() {
            console.log("跳 rup");
         }

         fun.sleep();
    </script>

    <!-- <script>

        function sum() {

            let sum = 0;
            for(let i = 0; i < arguments.length; i++) {
                let n  = arguments[i] || 0;
                sum += n;
            }

            return sum;
        }

        let result = sum(1,2,3,4,5,6,7);
        console.log(result);

    </script> -->

    <!-- <script>
        function sun(x,y) {
            return x + y;z
        }

        let result1 = sun(10);
        console.log(result1);

        let result2 = sun(10,20,30);
        console.log(result2);
    </script> -->
    
        <!-- <script>

            function sun(x,y) {
                return x + y;
            }

            let result1 = sun(10,30);
            console.log(result1);

            let result2 = sun('hello','world');
            console.log(result2);

            let result3 = sun('hello',10);
            console.log(result3);

            let result4 = sun(10,30.5);
            console.log(result4);

        </script> -->

</body>
</html>